﻿using UnityEngine;
using System.Collections;

public class BindAccountUI : MonoBehaviour {
    public GameObject registPanel;
    public GameObject userNameInput;
    public GameObject passWordInput;
    //public GameObject closePanel;
    //public GameObject clearUserName;
    //public GameObject clearPassWord;
    public GameObject userInputPanel;

    public Login.LoginManager manager;
    /// <summary>
    /// 绑定按钮
    /// </summary>
    public void OnBindButtonClick() 
    {
        Debug.Log("点击了绑定按钮");
    }
    /// <summary>
    /// 快速注册按钮
    /// </summary>
    public void OnRegist() 
    {
        manager.CleanCache();//清空缓存
        
        this.gameObject.SetActive(false);
        registPanel.SetActive(true);
    }
    /// <summary>
    /// 忘记密码
    /// </summary>
    public void ForgetPassWord() 
    {
        Debug.Log("点击了“忘记密码”");

    }

    public void TotursLogin() 
    {
        Debug.Log("点击了“游客登录”");
    }
    /// <summary>
    /// 关闭面板按钮
    /// </summary>
    public void OnClosePanel() 
    {
        this.gameObject.SetActive(false);
        userInputPanel.GetComponent<UserInput>().ErrInfoFalse();
    }
    /// <summary>
    /// 重新输入用户名
    /// </summary>
    public void CleanUserName() 
    {
        userNameInput.GetComponent<UIInput>().value = "";
        userNameInput.GetComponent<UIInput>().label.GetComponent<UILabel>().text = "";
    }
    /// <summary>
    /// 重新输入密码
    /// </summary>
    public void CleanPassWord() 
    {
        passWordInput.GetComponent<UIInput>().value = "";
        passWordInput.GetComponent<UIInput>().label.GetComponent<UILabel>().text = "";
    }


   
}
